package vip.sweet.biz.modular.product.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import vip.sweet.biz.modular.product.entity.BizProductImages;
import vip.sweet.biz.modular.product.mapper.BizProductImagesMapper;
import vip.sweet.biz.modular.product.params.BizProductImagesAddParams;
import vip.sweet.biz.modular.product.service.BizProductImagesService;

/**
 * @author ASUS
 * @Date 2025/10/5 11:35
 * @Descripition
 */
@Service
public class BizProductImagesServiceImpl extends ServiceImpl<BizProductImagesMapper, BizProductImages> implements BizProductImagesService {
    @Override
    public boolean add(BizProductImagesAddParams bizProductImagesAddParams) {
        if (ObjectUtil.isNotEmpty(bizProductImagesAddParams))
            return save(BeanUtil.toBean(bizProductImagesAddParams, BizProductImages.class));
        return false;
    }
}
